-
Notifications
You must be signed in to change notification settings - Fork 183
Detailed example attribution #1009
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
src/content/ui/en.yaml
Outdated
| Revised by: Revised by | ||
| Based on: Based on | ||
| Created by: Created by | ||
| and: and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the format you've arrived at here is a good compromise between having to juggle a lot more content in translations and awkwardness in structure.
The one thing that might be an issue, which I'm not really sure is an issue or not, is whether translations for small chunks can be strung together with the same structure across languages, or if the grammar of those languages would need e.g. a reordering of the translation strings. It seems like most of these should be ok, but I guess the code to full sentences we do here, the more flexibility translations will have. This could be a non issue for this current set of strings though, I just don't know enough of the languages we support to say for sure so I thought I'd mention it just in case!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again for taking the time to review this. So after looking into this - the full solution would involve something like a i18n string "Edited and maintained by {p5.js} and {pf_org}" which is then filled in with the link, so more grammars can be supported, without this and: and workaround. I will make this a separate open issue for someone else to tackle. In this PR I have updated the i18n strings to se a clearer hierarchy for those strings relevant to the attribution message, so there's no side effects:
attribution:
Remixed by: Remixed by
Revised in 2023 by: Revised in 2023 by
Revised by: Revised by
Based on: Based on
Created by: Created by
and: and
Edited and maintained by: Edited and maintained by
From 2024 onwards, edited and maintained by: From 2024 onwards, edited and maintained by
You can find the code history of these examples here: You can find the code history of these examples here
You can suggest improvements by: You can suggest improvements by
contributing to the current website: contributing to the current website
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That approach makes sense, thanks for looking into it!
| const collectivelyAttributedSince = example.data.remix?.reduce( | ||
| (acc: number | null, item) => { | ||
| if (item.collectivelyAttributedSince) { | ||
| return item.collectivelyAttributedSince; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this means we need these entries in chronological order? might be worth stating that explicitly in the docs in case someone accidentally does them in reverse chronological.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great point, will update!
(Reopening #841, which was incorrectly / accidentally closed)
Addresses #415 - work in progress. Remains to be done:
Ensure all people mentioned in any part of attribution is on all-contributors in p5.js README in both main and dev-2.0 branches and include "example" emoji. Complete list:Alternatively, can reach out to these contributors and ask them if they want to be included in the list. Since the attribution would be clear on each example.Prof** WM Harris,GH/prashantgupta24Current Behavior
The license is at the bottom of the page, and attribution (inspired by and maintained by) is split.
(Then there is the sketch and the code - viewer has to scroll all the way down)
PR Behavior
Although attribution of p5.js contributors work is collective, this schema allows detailed attribution of referenced work from outside the community in a detailed attribution history. For example, including the following in the
.mdxof an example:Will create the following attribution:
Thus, new examples can be added that correctly attribute referenced material. In the above schema, the
collectivelyAttributedSincefield is applicable mainly to examples ported from the Processing or archived p5.js site. For future additions, theremixfiled can be used to provide a complete history. The URLs for attribution and type of remix can be edited, with optional URLs. If there is no remixLabel, "Remixed from" will be used, but other phrasing can be provided for clarity.